<?php
/**
 * Created by PhpStorm.
 * User: thor
 * Date: 14-8-5
 * Time: 上午11:29
 */
class MQSmsCommand extends BaseCommand{
    /**
     * @var string
     */
    protected $name = 'command:MQSms';

    protected $description ='每30秒运行一次，处理队列中待发送的短信';

    private $oSmsService = NUll;

    public function __construct(){
       parent::__construct();
       $this->oSmsService = SmsService::instance();
    }

    public function fire(){
        parent::getAllparams();
        $result = $this->oSmsService->processSmsWithMQ();
        if ($result) {
            echo "处理完毕\n";
        } else {
            echo "产生错误，请查看日志\n";
        }
    }

}